home *** CD-ROM | disk | FTP | other *** search
-
- Screen-Image Files
-
- Larry Lockwood
- Orange County IBM PC Users Group
-
- Last December I chaired a meeting at which over thirty representatives
- of Naval and Air Force installations from around the country attended a
- demonstration of a cruise missile data base using an IBM PC with a 23MB
- external hard disk. All morning, these people stood while the software
- laboriously ground through the data base, time after agonizing time.
- Since the objective of the demonstration was to present results (not
- the manipulations required to produce the results), we all wasted a
- morning that could have been more productively spent on other agenda
- items.
-
- That night, as I thought of how the demonstration might have been
- handled if only I had had some additional equipment, it occurred to me
- that snapshots and software might work together. I'd create a program
- that would take "snapshots" of CRT displays and store them in a file.
- A second program would recall them. It would take a week or so and
- wouldn't cost a thing (except the programming time at home each
- evening). By March, I had created two assembly language programs,
- which I called PUSH and POP because I saw a similiarity between
- saving/restoring a CRT image on a file and pushing/popping a register
- to a stack.
-
- PUSH.COM is the program that, once loaded, remains resident in memory.
- When it has been loaded, the CRT display can be copied to a
- screen-image file by concurrently depressing the Shift-PrtSc keys. You
- can no longer use Shift-PrtSc to copy the CRT display to the printer
- until you reboot (IPL) the computer.
-
- The syntax for loading PUSH.COM is
-
- PUSH drive:filename (do not use a file extension)
-
- For example, suppose PUSH.COM is on the diskette in drive A and you
- wish to create a series of screen-image files named SNAPSHOT on a
- diskette in drive B. The installation entry would be:
-
- PUSH b:snapshot
-
- When you first press the Shift-PrtSc keys, PUSH will create a
- screen-image file named SNAPSHOT.001 on the diskette in drive B. The
- second time the Shift-PrtSc keys are pressed, another screen-image
- file, SNAPSHOT.002, will be created, and so on.
-
- When you save a text screen, the corresponding screen-image file size
- is 4100 bytes. A graphics screen will create a corresponding 16,300
- byte screen-image file. You can copy approximately 88 text images or
- 22 graphics images to a 360KB diskette. Once you create a series of
- screen-image files, use the DOS RENAME command to give your files more
- meaningful names. POP.COM restores a screen-image file to the
- display. The syntax, using the example above, would be
-
- POP B:SNAPSHOT.001
-
- When I first tried POP.COM, I found that it always restored graphics
- images on a black background with the palette 0 foreground colors
- (cyan, white, and magenta). After digging through the Technical
- Reference Manual, I concluded that these are the default IBM PC color
- settings and there was no way that I could rewrite PUSH.COM to capture
- the Color Select Register setting (it's a write-only register). My
- only choice was to modify POP.COM to provide a means of restoring the
- original colors via function keys. While I was at it, it occurred to
- me that the function keys could also be used to change the attributes
- of individual characters in text files.
-
- One thing led to another and what finally evolved was a POP.COM program
- that restores the original screen image and allows you to modify almost
- everything. The function keys do the following:
-
- F1 - Changes background colors of graphics images and border
- colors of text images.
-
- F2 - Toggles graphics foreground colors back and forth
- between palettes 0 and 1.
-
- F3 - Selects background colors for individual characters in
- text mode.
-
- F4 - Selects foreground colors for individual characters in
- text mode.
-
- F5 - Exercises your left forefinger.
-
- F6 - Controls individual character blinking.
-
- Shift-F7 - Reloads the original screen-image file again.
- (Use this if you've made modifications that you don't
- like and decide it would be quicker to just start all
- over again.)
-
- Shift-F8 - Saves modified image back to the disk with the
- original filename. (Careful -- this destroys the
- original image.)
-
- Esc - Exits and returns to DOS without saving modified
- screen.
-
- Other keys - The cursor keys are functional in text and
- graphics modes, as are the alphanumeric keys. In
- graphics mode, however, the cursor is implemented as a
- one-pixel dot that moves around the screen. It starts
- in the upper left-hand corner of the screen, but you
- won't see it until one of the cursor keys is depressed.
- The Home key moves the cursor up-left and the End key
- moves it down-left. The Ctrl key, when used in
- conjunction with the alphanumeric keys, produce the IBM
- PC symbols associated with the various control codes.
- If you have the IBM Technical Reference Manual, the
- symbols are shown on page C-1. If not, just experiment.
-
-
- These programs were written specifically for an IBM PC with a
- Color/Graphics Monitor Adapter. Any compatibility with other PCs or
- adapters is strictly coincidental. These programs will not work with a
- Monochrome Display Adapter, because both PUSH and POP read from, and
- write to, the color display memory at B800h. Also, the IBM Monochrome
- Display Adapter has no graphics capabilities.
-
- Perhaps the simplest way to provide continuous, sequential viewing of
- screen-images files is to create BATch files with the filenames
- separated by PAUSE commands.
-
- [Note: We have placed Mr. Lockwood's PUSH.COM and POP.COM
- programs in the <F>iles section.]
-
- (This article may be reprinted provided credit is given to the
- original author and to the Exchange newsletter.)
-
-